﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.AspNetCore.Mvc.Internal;
using System;
using System.Threading.Tasks;
using ModelPlugin;

namespace ControllerPlugin
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class Test1Controller : ControllerBase
    {
        [HttpGet]
        public async Task<string> GetString()
        {
            var routeDic = ControllerContext.RouteData.Values;
            TestModel data = new TestModel { Name = "数据模型dll未加载" };
            return await Task.FromResult<string>($"子插件{routeDic["controller"]}_{routeDic["action"]}->data:{data.Name}");
        }
    }
}
